package com.scs.application.modules.finance.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
/**
 * <p>
 *
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "结算周期表")
@TableName("finance_period")
public class Period extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "期间",
            length = "10",
            not_null = true,
            default_value = "",
            comment = "YYYYMM"
    )
    private String period;

    @JsonFormat(pattern="yyyy/MM/dd", timezone = "GMT+8")
    @EntityFieldAnnotation(
            text = "起始日期",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Date startDate;

    @JsonFormat(pattern="yyyy/MM/dd", timezone = "GMT+8")
    @EntityFieldAnnotation(
            text = "结束日期",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Date endDate;

    @EntityFieldAnnotation(
            text = "备注",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    @EntityFieldAnnotation(
            text = "状态",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "0：创建；-1：已关闭"
    )
    private Integer status;

}
